<{extend name="base" /}>
<{block name="body"}>
<style>
.layui-form-item .layui-form-checkbox{
    width: 82px;
}
.layui-form-checkbox span{
    width: 30px;
}
.layui-form-mid{
    margin-left: 110px;
}
</style>
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">基础配置</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="<{:url('admin/setting/updateConfig')}>" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">默认关键词</label>
                        <div class="layui-input-block">
                            <input type="text" name="setting[keyword]" value="<{$data.keyword|default=''}>"   lay-verify="required" placeholder="请输入默认关键词" autocomplete="off" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商务通直连链接</label>
                        <div class="layui-input-block">
                            <input type="text" name="setting[url]" value="<{$data.url|default=''}>"  lay-verify="url" placeholder="http://testserver.zoosnet.net/LR/Chatpre.aspx?id=lza69557093&lng=cn"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">商务通引入js</label>
                        <div class="layui-input-block">
                            <input type="text" name="setting[swtjs]" value="<{$data.swtjs|default=''}>"  lay-verify="required" placeholder='例如：<script language="javascript" src="http://testserver.zoosnet.net/JS/LsJS.aspx?siteid=lza69557093&lng=cn"></script>
                            '  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">客服电话</label>
                        <div class="layui-input-block">
                            <input type="text" name="setting[tel]" value="<{$data.tel|default=''}>"  lay-verify="" placeholder="请输入客服电话"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">延迟时间</label>
                        <div class="layui-input-block">
                            <input type="text" name="setting[ystime]" value="<{$data.ystime|default='0'}>"  lay-verify="required|number" placeholder="打开页面后多少秒显示，请输入整数"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">默认标题</label>
                        <div class="layui-input-block">
                            <input type="text" name="setting[title]" value="<{$data.title|default='百度问问-智慧咨询'}>"  lay-verify="required" placeholder="百度问问-智慧咨询"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">回退地址</label>
                        <div class="layui-input-block">
                            <input type="text" name="setting[backurl]" value="<{$data.backurl|default=''}>"  lay-verify="url" placeholder="专题或者商务通地址"  class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">底部是否可以输入</label>
                        <div class="layui-input-block">
                            <{php}>
                            if(!isset($data['is_input'])){
                            $data['is_input'] = 1;
                            }
                            <{/php}>
                            <input type="radio" name="setting[is_input]" value="1" title="是" <{if condition="$data.is_input == 1" }>checked<{/if}> >
                            <input type="radio" name="setting[is_input]" value="0" title="否" <{if condition="$data.is_input == 0" }>checked<{/if}> >
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">是否强制修改回退地址</label>
                        <div class="layui-input-block">
                            <{php}>
                            if(!isset($data['is_input'])){
                            $data['is_input'] = 1;
                            }
                            <{/php}>
                            <input type="radio" name="setting[is_back]" value="1" title="是" <{if condition="$data.is_input == 1" }>checked<{/if}> >
                            <input type="radio" name="setting[is_back]" value="0" title="否" <{if condition="$data.is_input == 0" }>checked<{/if}> >
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">开启时间段</label>
                        <{php}>
                        if(!isset($data['opentime'])){
                            $data['opentime'] = [];
                        }
                        if(!isset($data['area'])){
                            $data['area'] = [];
                        }
                        <{/php}>
                        <div class="layui-input-block">
                            <input type="checkbox" name="setting[opentime][]" value="0" title="0点"   <{if condition="in_array('0',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="1" title="1点"   <{if condition="in_array('1',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="2" title="2点"   <{if condition="in_array('2',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="3" title="3点"   <{if condition="in_array('3',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="4" title="4点"   <{if condition="in_array('4',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="5" title="5点"   <{if condition="in_array('5',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="6" title="6点"   <{if condition="in_array('6',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="7" title="7点"   <{if condition="in_array('7',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="8" title="8点"   <{if condition="in_array('8',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="9" title="9点"   <{if condition="in_array('9',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="10" title="10点" <{if condition="in_array('10',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="11" title="11点" <{if condition="in_array('11',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="12" title="12点" <{if condition="in_array('12',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="13" title="13点" <{if condition="in_array('13',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="14" title="14点" <{if condition="in_array('14',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="15" title="15点" <{if condition="in_array('15',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="16" title="16点" <{if condition="in_array('16',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="17" title="17点" <{if condition="in_array('17',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="18" title="18点" <{if condition="in_array('18',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="19" title="19点" <{if condition="in_array('19',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="20" title="20点" <{if condition="in_array('20',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="21" title="21点" <{if condition="in_array('21',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="22" title="22点" <{if condition="in_array('22',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="23" title="23点" <{if condition="in_array('23',$data.opentime)" }>checked<{/if}> />
                            <input type="checkbox" name="setting[opentime][]" value="24" title="24点" <{if condition="in_array('24',$data.opentime)" }>checked<{/if}> />
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            0点表示 0点-1点范围 1点表示 1点到2点范围 以此类推
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">IP黑名单</label>
                        <div class="layui-input-block">
                            <textarea name="setting[ips]" placeholder="请在下列输入不需要被记录的IP对应的访客，一行一个IP。最多30个" class="layui-textarea"><{$data.ips|default=''}></textarea>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">开启地域</label>
                        <div class="layui-input-block">
                             <input type="checkbox" name="setting[area][]" value="北京"  title="北京" <{if condition="in_array('北京',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="安徽"  title="安徽" <{if condition="in_array('安徽',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="重庆"  title="重庆" <{if condition="in_array('重庆',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="福建"  title="福建" <{if condition="in_array('福建',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="甘肃"  title="甘肃" <{if condition="in_array('甘肃',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="广东"  title="广东" <{if condition="in_array('广东',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="广西"  title="广西" <{if condition="in_array('广西',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="贵州"  title="贵州" <{if condition="in_array('贵州',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="海南"  title="海南" <{if condition="in_array('海南',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="河北"  title="河北" <{if condition="in_array('河北',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="黑龙江"  title="黑龙江" <{if condition="in_array('黑龙江',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="河南"  title="河南" <{if condition="in_array('河南',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="湖北"  title="湖北" <{if condition="in_array('湖北',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="湖南"  title="湖南" <{if condition="in_array('湖南',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="江苏"  title="江苏" <{if condition="in_array('江苏',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="江西"  title="江西" <{if condition="in_array('江西',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="吉林"  title="吉林" <{if condition="in_array('吉林',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="辽宁"  title="辽宁" <{if condition="in_array('辽宁',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="内蒙古"  title="内蒙古" <{if condition="in_array('内蒙古',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="宁夏"  title="宁夏" <{if condition="in_array('宁夏',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="青海"  title="青海" <{if condition="in_array('青海',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="山东"  title="山东" <{if condition="in_array('山东',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="上海"  title="上海" <{if condition="in_array('上海',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="山西"  title="山西" <{if condition="in_array('山西',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="陕西"  title="陕西" <{if condition="in_array('陕西',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="四川"  title="四川" <{if condition="in_array('四川',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="天津"  title="天津" <{if condition="in_array('天津',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="新疆"  title="新疆" <{if condition="in_array('新疆',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="西藏"  title="西藏" <{if condition="in_array('西藏',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="云南"  title="云南" <{if condition="in_array('云南',$data.area)" }>checked<{/if}> />
                             <input type="checkbox" name="setting[area][]" value="浙江"  title="浙江" <{if condition="in_array('浙江',$data.area)" }>checked<{/if}> />
                        </div>
                        <div class="layui-form-mid layui-word-aux">
                            请根据需求选定地域，防止被查封
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">JS代码</label>
                        <div class="layui-input-block">
                            <textarea name="setting[js]" placeholder="请输入统计代码,不要加<script></script>" class="layui-textarea"><{$data.js|default=''}></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="*">提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<{/block}>
